package g327app4springcloud

class RestTemplateExample4ClientSideController {

    def restTemplate

    def index(String applicationName) {
        def service_uri = "http://${applicationName ?: 'GRAILS-CLOUD-DEMO'}/serviceSide/index.json", args = [name: 'mars']

//        render restTemplate.postForObject(service_uri, args, Map.class)
        render restTemplate.postForObject(service_uri, args, MyCommandObject.class)
    }
}
